AttributeError: 'str' object has no attribute 'contains'